package com.tarena.lbs.stock.web.rpc;

import com.tarena.lbs.pojo.stock.bo.CouponStockBO;
import com.tarena.lbs.pojo.stock.param.CouponStockParam;
import com.tarena.lbs.stock.api.CouponStockApi;
import com.tarena.lbs.stock.web.service.CouponStockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class CouponStockRpcService implements CouponStockApi {

    @Autowired
    private CouponStockService couponStockService;

    @Override
    public CouponStockBO getCouponStock(Integer couponId) {
        return couponStockService.getDetail(couponId);
    }

    @Override
    public void insertCouponStock(CouponStockParam param) {
        couponStockService.insert(param);
    }

    @Override
    public void updateCouponStock(CouponStockParam param) {
        couponStockService.update(param);
    }
}
